<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateMeetPersonsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('meet_persons', function (Blueprint $table) {
            $table->bigIncrements('id')->comment('自增ID');

            $table->string('name', 100)->comment('姓名');
            $table->unsignedTinyInteger('sex')->default(0)->comment('性别 0:未知 1:男 2:女');
            $table->string('phone', 100)->nullable()->comment('手机号码');
            $table->string('paper_type', 255)->nullable()->comment('证件类型');
            $table->string('paper', 255)->nullable()->comment('证件号码');


            $table->unsignedBigInteger('add_uid')->comment('添加者uid')->index();

            $table->timestamps();
            $table->softDeletes();

            $table->engine = 'InnoDB';

        });

        DB::statement("alter table `meet_persons` comment'场馆预约人表'");

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('meet_persons');
    }
}
